export default {
	files: {
		cat: {
			list: {
				url: `/files/cat/list`,
				name: '获取文件分类',
				get: async function (params: object | undefined) {
					return await http.get(this.url, params)
				}
			},
			add: {
				url: `/files/cat/add`,
				name: '增加文件分类',
				post: async function (data: object | undefined) {
					return await http.post(this.url, data)
				}
			},
			edit: {
				url: `/files/cat/edit`,
				name: '编辑文件分类',
				post: async function (data: object | undefined) {
					return await http.post(this.url, data)
				}
			},
			del: {
				url: `/files/cat/delete`,
				name: '编辑文件信息',
				delete: async function (data: object | undefined) {
					return await http.delete(this.url, data)
				}
			}
		},
		file: {
			list: {
				url: `/files/file/list`,
				name: '获取文件列表',
				get: async function (params: object | undefined) {
					return await http.get(this.url, params)
				}
			},
			upload: {
				url: `/files/file/upload`,
				name: '上传文件',
				post: async function (data: object | undefined) {
					return await http.post(this.url, data)
				}
			},
			edit: {
				url: `/files/file/edit`,
				name: '编辑文件信息',
				post: async function (data: object | undefined) {
					return await http.post(this.url, data)
				}
			},
			del: {
				url: `/files/file/delete`,
				name: '编辑文件信息',
				delete: async function (data: object | undefined) {
					return await http.delete(this.url, data)
				}
			}
		}
	}
}
